home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TFORK(3) MINTLIB LIBRARY FUNCTIONS TFORK(3)
-
-
- N✓NA✓AM✓ME✓E
- tfork - start a new thread
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- long tfork(int (*func)(long), long arg);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- tfork starts a new thread of execution running in the same
- address space. The new thread gets its own 4K stack, and
- starts at the address in func with arg on the stack, i.e.
- as though the main program had a call like (*func)(arg).
- The main program continues executing, with tfork returning
- the process ID of the child.
-
- If MiNT is not active, then the child runs to completion
- and the return value is the child's exit status; vfork
- relies on this behavior.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- e✓ex✓xe✓ec✓c.✓..✓.(✓(3✓3)✓),✓, f✓fo✓or✓rk✓k(✓(3✓3)✓),✓, v✓vf✓fo✓or✓rk✓k(✓(3✓3)✓),✓, w✓wa✓ai✓it✓t(✓(3✓3)✓)
-
- N✓NO✓OT✓TE✓ES✓S
- Parent and child share the same memory; this could cause
- problems with some library calls, notably malloc.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-